<?php


class Sherpa_IndexController extends Zend_Controller_Action
{

	public function init()
	{
		Zend_Layout::getMvcInstance()->setLayout('layout');
	}

	/**
	 * Kein Hinzufuegen-Link
	 *
	 * @return string
	 */
	public function getDefaultAddUrl()
	{
		return '';
	}

    /**
     * Nur das Icon Ansehen einblenden
     *
     * @param WSB_Db_Row $model
     * @param integer $modelIndex
     * @return array
     */
	public function buildListItemHtmlLinks(WSB_Db_Row $model, $modelIndex=0)
	{
		$links = array();
		array_push($links, $this->_buildViewListItemHtmlLink($model, $modelIndex));
		return $links;
	}

	public function indexAction()
	{
		// Page title
		$this->view->headTitle('Sherpa');

		/**
		 * @var $loader WSB_Controller_Helper_ResourceLoader
		 */
		//$loader = $this->getHelper('ResourceLoader');
		//$table = $loader->getDbTable('Test');
		//$loader->getModel('Test');
		//$this->view->form = $loader->getForm('Test');

	}

	public function saveAction()
	{
        /*$request = $this->getRequest();
        if (!$request->isPost()) {
            return $this->_helper->redirector('index');
        }
		$this->view->form = $this->getHelper('ResourceLoader')->getForm('Test');
		$id = 2; // Test
 		$this->getHelper('redirector')->direct('index', null, null, array('id' => $id));
 		*/
	}

}

